package com.admin.persistence.sys.mapper;

import com.admin.persistence.sys.entity.Jurisdtion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jack
 * @since 2019-05-04
 */
public interface JurisdtionMapper extends BaseMapper<Jurisdtion> {

    @Select("SELECT J.* FROM sys_jurisdtion J " +
            "INNER JOIN" +
            "sys_role_jurisdtion R_J" +
            "ON" +
            "J.ID = R_J.ROLE_ID" +
            "WHERE R_J.ROLE_ID=#{roleId}")
    List<Jurisdtion> queryByRole(@Param("roleId") String roleId);


}
